<html xmlns="http://www.w3.org/1999/xhtml">
<script>
function test() {
  if (window.testRunner)
    testRunner.dumpAsText();

  var target = document.getElementById('target');

  target.innerHTML += "\t&lt;p>&lt;/p>";
  if (target.firstChild.nodeName == "#text")
    target.innerHTML = "SUCCESS";
  else
    target.innerHTML = "FAIL. Incorrect node type for whitespace: " + target.firstChild.nodeName + ".";
}
</script>
<body onload="test();">
    <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=16731">bug 16731</a>:
    Incorrect node type for whitespace when setting innerHTML in an XHTML document.</p>
    <div id="target"></div>
</body>
</html>
